package com.hornsun.repository.mapper;

import com.hornsun.domain.dbo.Information;
import com.hornsun.domain.dbo.InformationExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Component;

@Component
public interface InformationMapper {
    long countByExample(InformationExample example);

    int deleteByExample(InformationExample example);

    int deleteByPrimaryKey(String informationGuid);

    int insert(Information record);

    int insertSelective(Information record);

    List<Information> selectByExampleWithRowbounds(InformationExample example, RowBounds rowBounds);

    List<Information> selectByExample(InformationExample example);

    Information selectByPrimaryKey(String informationGuid);

    int updateByExampleSelective(@Param("record") Information record, @Param("example") InformationExample example);

    int updateByExample(@Param("record") Information record, @Param("example") InformationExample example);

    int updateByPrimaryKeySelective(Information record);

    int updateByPrimaryKey(Information record);

    //重置推荐
    void resetRecommend(String typeid);

    //获取收藏的资讯
    List<Information> getFavouriteInformation(@Param("openid")String openid,@Param("offset")int offset);

    //点赞
    void updatePraiseByGuid(String informationGuid);

    //点击
    void updateHitsByGuid(String informationGuid);

    //收藏量+1
    void updateFavourite(String informationGuid);

}